package pl.perseus.action;

import lombok.Getter;
import lombok.Setter;

import org.springframework.beans.factory.annotation.Autowired;

import pl.perseus.model.User;
import pl.perseus.service.user.IUserService;

public class DeleteUserAction extends BaseAction {

	@Autowired
	IUserService userService;
	
	@Getter
	@Setter
	User user;
	
	@Override
	public String execute() {
		String login = user.getLogin();
		userService.deleteUser(user);
		logAction("User has been deleted "+login);
		return SUCCESS;
	}

}
